#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import glovar
import datetime

def work():
    now = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")    
    os.system('pwd')
    # 更换路径
    os.chdir(glovar.store_path)
    os.system('pwd')
    os.system('git pull')
    os.system('git add .')

    commitInfoCmd = "git commit -m 'new commit at %s'"%(now)
    os.system(commitInfoCmd)
    os.system('git push origin master')



if __name__ == "__main__":
    work()
